package decorator.demo1;

/**
 * 定义具体的对象，给这个对象添加一些职责（被装饰）
 * 相当于：FileInputStream
 *
 * @author GongXincheng
 * @since 2019-09-17 13:34
 */
public class ConcreteComponent implements Component {

    private String name;

    ConcreteComponent(String name) {
        this.name = name;
    }

    @Override
    public void operation() {
        System.out.println("My name is ：" + name);
    }
}
